export default ($axios) => (path) => {
  return {
    register: (data) => $axios.$post(`${path}/register`, data),
    login: (data) => $axios.$post(`${path}/login`, data),
    getUserInfo: () => $axios.$get(`${path}/getUserInfo`),
    update: (id, data) => $axios.$patch(`${path}/user/${id}`, data),
    getStatistics: () => $axios.$get(`${path}/getStatistics`),
    getImage: (params) => $axios.$get(`/random`, { params }),
  }
}
